Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/e2e/timer #362

Merged
merged 12 commits into from
Dec 20, 2024
Merged

Test/e2e/timer #362

merged 12 commits into from
Dec 20, 2024

Conversation

francelu
Copy link
Contributor

@francelu francelu commented Dec 20, 2024

Add End-to-End Test for Timer

Description

This PR introduces a comprehensive end-to-end test for the timer functionality in the PeriodPals Android application. The test navigates through the sign-up, profile creation, and timer actions to ensure the entire flow works as expected.

It closes issue #301.

Changes

New End-to-End Test

  • Added EndToEndTimer class in EndToEndTimer.kt to test the complete user flow from sign-in to using the timer.
  • Utilized composeAndroidTestRule for setting up the test environment and interacting with UI components.
  • Implemented navigation and interaction steps to simulate user actions such as signing up, creating a profile, and using the timer.
  • Included assertions to verify that each screen and action displays the expected results, ensuring the integrity of the user flow.
  • Delete account through settings UI.

Files

Added

  • app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndTimer.kt

Testing

  • Tested user flow from sign-in, through profile screen, bottom navigation menu, to timer usage using assertions to confirm screen and action validity. Deleted the account through settings UI.

@francelu francelu requested a review from agonzalez-r December 20, 2024 04:04
@francelu francelu self-assigned this Dec 20, 2024
@francelu francelu requested a review from Harrish92 December 20, 2024 04:08
@coaguila coaguila self-requested a review December 20, 2024 05:10
@francelu francelu removed the request for review from coaguila December 20, 2024 05:22
Copy link
Contributor

@charliemangano charliemangano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As always, good job on the end-to-ends! LGTM!

@@ -64,8 +65,7 @@ class EndToEndSignUp : TestCase() {
* logged in and log them out if they are. Create a new account and its profile for the test.
*/
@Before
fun setUp() {

fun setUp() = runBlocking {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

.performScrollTo()
.assertIsDisplayed()
.performClick()
SystemClock.setCurrentTimeMillis(System.currentTimeMillis() + 6L * HOUR + 30L * MINUTE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thinking setting the system clock

Copy link
Contributor

@Harrish92 Harrish92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Good job on your work. It was not easy to make it work, but you did it

Important

Code Quality

  • The code is understandable and the tests are described at every steps.

Testing

  • testing is complete. Good job.

Steps before PR approved

  • LGTM

@francelu francelu merged commit 9dd53aa into main Dec 20, 2024
3 checks passed
@francelu francelu deleted the test/e2e/timer branch December 20, 2024 05:59
@francelu francelu linked an issue Dec 20, 2024 that may be closed by this pull request
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

M3 end-to-end timer
3 participants